package com.etc.controller;

import com.etc.entity.User;
import com.etc.service.impl.UserServicelmpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author kalista
 * @Description
 * @Date 2021/1/2  15:43
 **/
@RestController
@RequestMapping("/user")
public class userController {
    @Autowired
    private UserServicelmpl userServicelmpl;
    @GetMapping("/findAll")
    public List<User> finduser(){
        List<User> finduser = userServicelmpl.finduser();
        return finduser;
    }
    @GetMapping("/find1")
    public User findById(Integer uId){
        User byId = userServicelmpl.findById(uId);
        return byId;
    }

}
